/bufferIO
Reader.ts
ReaderTools.ts
/core
Long.ts
format.ts
/headers
/headers/enums
DataDirectoryKind.ts
DllCharacteristics.ts
ImageCharacteristics.ts
MZSignature.ts
Machine.ts
PEMagic.ts
PESignature.ts
SectionCharacteristics.ts
Subsystem.ts
AddressRange.ts
DosHeader.ts
OptionalHeader.ts
PEHeader.ts
SectionHeader.ts
/imports
/imports/knockout
knockout-3.0.0.js
/layout
pe.css
pefile.html
/sample
sample.js
/typings
knockout.d.ts
LoaderContext.ts
PEFile.ts
pe.html
pe.ts
1
module pe {
2
 
3
  /**
4
   * PE file headers and data.
5
   * This object doesn't know how to read PE files, it merely represents the content.
6
   */
7
  export class PEFile {
8
 
9
    /**
10
     * DOS header starts from physical offset 0 in the file.
11
     * First two bytes of DOS header form classic MZ signature in ASCII code.
12
     * The values in DOS header's fields carry no particular meaning in the modern PE format.
13
     */
14
    dosHeader: pe.headers.DosHeader = null;
15
 
16
    /**
17
     * By convention, this stretch of bytes contains a small program in x86 16-bit assembler
18
     * printing a dummy message 'this program cannot run in DOS mode'. 
19
     */
20
    dosStub: Uint8Array = null;
21
 
22
    /**
23
     * Contains old-style timestamp, machine architecture enum and several values used to reference and parse other parts of PE file.
24
     */
25
    peHeader: pe.headers.PEHeader = null;
26
 
27
    /**
28
     * Not optional anymore in modern environment, this structure contains 32/64 bitness flag, several version fields
29
     * and references to data directories, structures in PE file containing specific predefined data.
30
     * For example, data directory at index 14 refers to .NET metadata.
31
     */
32
    optionalHeader: pe.headers.OptionalHeader = null;
33
 
34
    /**
35
     * Sections control physical/virtual mapping between PE file on disk and its expected layout in memory.
36
     * Apart from relocation offsets/sizes, section headers contain sybolic names and various flags related to sections.
37
     */
38
    sectionHeaders: pe.headers.SectionHeader[] = null;
39
 
40
    constructor(public path: string) {
41
    }
42
  }
43
}